package br.ucb.controller;

import java.io.Serializable;

import javax.faces.context.FacesContext;
import javax.servlet.http.HttpSession;

import br.ucb.bean.Professor;
import br.ucb.util.SimpleEntityManager;

public class GenericController implements Serializable{

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	
	private Professor professor;
	private SimpleEntityManager manager;
	public Professor getProfessor() {
		HttpSession session = (HttpSession) FacesContext.getCurrentInstance().getExternalContext().getSession(true);
        setProfessor((Professor) session.getAttribute("professor"));
		return professor;
	}
	public void setProfessor(Professor professor) {
		this.professor = professor;
	}
	public SimpleEntityManager getManager() {
		return manager;
	}
	public void setManager(SimpleEntityManager manager) {
		this.manager = manager;
	}
	
	public GenericController(){
		
	}

}
